<div class="content-area">
  <h1>自动购买者</h1>
  <p>
    其他自动购买者可以在单个单位的页面找到。
    自动购买者执行是按优先级排序的，升序(例如: -5优先级在100优先级之前执行)。
    最小间隔为1秒，之后您将获得最高购买。
  </p>
  <form>
    <section class="form-block">
      <div class="form-group">
        <button class="btn btn-danger-outline" (click)="openRefundModal()">
          重新发现
        </button>

        <label>选项:</label>

        <clr-checkbox-wrapper>
          <input
            type="checkbox"
            clrCheckbox
            name="on"
            [(ngModel)]="ms.game.autoBuyManager.enabled"
          />
          <label>开启</label>
        </clr-checkbox-wrapper>

        <clr-checkbox-wrapper>
          <input
            type="checkbox"
            clrCheckbox
            name=" Multi Buy"
            [(ngModel)]="ms.game.autoBuyManager.multiBuy"
          />
          <label>多重购买</label>
        </clr-checkbox-wrapper>
      </div>
    </section>
  </form>

  <div class="clr-row">
    <div
      class="clr-col-12	clr-col-sm-12	clr-col-md-10	clr-col-lg-6	clr-col-xl-5"
      *ngFor="let autoB of unlSpecial; trackBy: getAutoBuyId"
    >
      <div class="card">
        <div class="card-block">
          <app-auto-buy [autoBuy]="autoB"></app-auto-buy>
        </div>
      </div>
    </div>
  </div>
</div>

<clr-modal [(clrModalOpen)]="swowRefundModal">
  <h3 class="modal-title">Refund autobuyers</h3>
  <div class="modal-body">
    <p>
      Refund all autobuyers
      <span class="monospace">{{ totalRefSkill | format }}</span> skill
      experience?
    </p>
  </div>
  <div class="modal-footer">
    <button
      type="button"
      class="btn btn-outline"
      (click)="swowRefundModal = false"
    >
      取消
    </button>
    <button type="button" class="btn btn-primary" (click)="refund()">
      确定
    </button>
  </div>
</clr-modal>
